<template>
	<view>
		<!-- 底部导航栏 -->
		<nav-bar title="公告详情"  :back="true"  ></nav-bar>
		<!-- 公告头部信息 -->
		<view class="empHeader w100">
			<image :src="detailObj.image" class="w100"></image>
			<view class="headerTitle">{{detailObj.title}}</view>
		</view>
		<!-- 公告基本信息 -->
		<view class="empDetail " >
			<view class="detailHeader df-js-cen">
				<div class="heng"></div>
				<div class="title mg-rl-20">详情</div>
				<div class="heng"></div>
			</view>
		<!-- 	<view class="" v-for="(item,index) in 10" :key="index">
				<view class="empHtml" v-html="html"></view>
			</view> -->
				
		</view>
	</view>
</template>

<script>
	import {
		getNotice
	} from '/api/common.js';

	export default {
		data() {
			return {
				detailObj:{},
				html: '<div style="margin: 200rpx 0;color: red;"> <div style="line-height: 200rpx;">此区域为富文本展示区</div><div style="line-height: 200rpx;">此区域为富文本展示区</div><div style="line-height: 200rpx;">此区域为富文本展示区</div></div>',
	
			}
		},
		onPageScroll(res) {
			// console.log("页面滚动了")
			uni.$emit('onPageScroll', res.scrollTop)
		},
		onLoad(data) {
			this.getNotaDetail(data.id)
		},
		methods: {
			async getNotaDetail(id) {
				let res = await getNotice(id)
				this.detailObj=res.data.data
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #f4f4f4;
	}
	.empHeader{
		
		image{
			height: 50vh;
		}
		.headerTitle{
			background-color: #fff;
			font-weight: 550;
			margin: 50rpx;
		}
	}
	.empDetail{
		text-align: center;
		margin-top: 20rpx;
		.detailHeader{
			// background-color: yellow;
			margin: auto;
			.heng{
				width: 100rpx;
				border-bottom: 1px solid #f4f4f4;
			}
		}
	}
</style>
